#!/usr/bin/python
# -*- coding: utf-8 -*-
import types

#===============================================================================
# AD_PLACE = [
#            ['1', ['11', '12']], \
#            ['2',],\
#            ['3', ['31', '32']], \
#            ]
#===============================================================================

#===============================================================================
# AD_PLACE = (
#            ('北京市(010)',), \
#            ('上海市(021)',), \
#            ('天津市(022)',), \
#            ('重庆市(023)',), \
#            ('内蒙古', ('呼和浩特市(0471)',)), \
#            ('河北省', ('石家庄市(0311)',)), \
#            )
#===============================================================================
        
AD_PLACE = (
            ('china', None)
            ('')
            )
        
def place(p, par=''): 
    for x in p:
        if type(x) is types.StringType:
            print x
            print '%s \'s parent is %s \n' % (x, par)
            #par = x
        elif type(x) is types.ListType:
            #print x, 'parent is %s' % par
            print p.index(x)
            place(x, par)

if __name__ == '__main__':
    place(AD_PLACE, 'China')